<!--舆情级别标签-->
<script setup>
import { TimeoutStatusOptions } from '@/common/index.js'
const props = defineProps({
  level: {
    type: Number,
    default: 1
  },
  type:{
    type: String,
    default: 'value'
  },
  label:{
    type: String,
    default: ''
  }
})
const sentimentLevel = TimeoutStatusOptions.find((item) => item[props.type] === props.level)
</script>

<template>
  <span
    class="inline-block p-4px border-1px border-solid rounded-3px text-12px font-400 leading-12px my--5px"
    :style="{
      color: sentimentLevel.color,
      'border-color': sentimentLevel.color
    }"
  >{{label?`${label}：`:''}}{{ sentimentLevel.label }}</span
  >
</template>

<style scoped lang="less"></style>
